package com.cysyz.commonservice.mycommonservice.exception;

public class CommonServiceException extends Exception{

	private ExceptionLevel level;
	protected String commonServiceMsg;
	public CommonServiceException(ExceptionLevel level, String message) {
		commonServiceMsg = message;
		this.level = level;
	}
	public CommonServiceException(String message) {
		this(ExceptionLevel.ERROR, message);
	}
	public CommonServiceException() {
		this(ExceptionLevel.ERROR, null);
	}
	
	@Override
	public String getLocalizedMessage() {
		return commonServiceMsg;
	}
}
